package com.own.core.html.form.dateField;

import org.apache.wicket.datetime.PatternDateConverter;
import org.apache.wicket.datetime.StyleDateConverter;
import org.apache.wicket.datetime.markup.html.form.DateTextField;
import org.apache.wicket.model.IModel;
import org.apache.wicket.util.convert.IConverter;
import org.apache.wicket.extensions.yui.calendar.DatePicker;

import com.own.core.util.OwnDate;

public class OwnDateField extends DateTextField {

	DateField dateField;

//	public OwnDateField(String id) {
//		super(id);
//		init();
//
//	}

//	public OwnDateField(final String id, final IModel model) {
//		super(id, model);
//		init();
//
//	}

	public OwnDateField(final String id, final IModel model,
			DateField dateField) {
		super( id, model,new OwnDateConverter( "dd/MM/y", false));
		this.dateField = dateField;
		
 

		init();

	}

	private void init() {
		OwnDatePicker datePicker = new OwnDatePicker();
//		datePicker.setShowOnFieldClick(true);
	        this.add(datePicker);

		setType(String.class);

	}
 
}
